package cn.stylefeng.guns.modular.business.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 金额变动表
 * </p>
 *
 * @author jwj
 * @since 2019-07-16
 */
@TableName("c_money_log")
@Data
public class MoneyLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "money_id", type = IdType.AUTO)
    private Integer moneyId;

    /**
     * 变动金额
     */
    @TableField("amount")
    private BigDecimal amount;

    /**
     * 原金额
     */
    @TableField("old_amount")
    private BigDecimal oldAmount;

    /**
     * 变动后的金额
     */
    @TableField("new_amount")
    private BigDecimal newAmount;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 用户名
     */
    @TableField("user_name")
    private String userName;

    /**
     * 1、销卡结算2、销卡分润3、提现
     */
    @TableField("type")
    private Integer type;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField("delete_flag")
    private Integer deleteFlag;

    @Override
    public String toString() {
        return "MoneyLog{" +
        "moneyId=" + moneyId +
        ", amount=" + amount +
        ", oldAmount=" + oldAmount +
        ", newAmount=" + newAmount +
        ", userId=" + userId +
        ", userName=" + userName +
        ", type=" + type +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", deleteFlag=" + deleteFlag +
        "}";
    }
}
